function asset_search(ids, callback) {
  callback = callback || $.noop
  ids = ids || [];
  $('<div title="Select tags" id="asset_tags">Loading data...</div>')
  .dialog({
  	width: 700,
  	height: 500,
  	modal: true,
  	buttons: {
  		"Apply": function() {
  		  var tags = [];
  		  $('input[name=asset_tags[]]:checked').each(function(){
  		    var tag = {id:this.value,name:$(this).parent().text()};
  		    tags.push(tag);
  		  });
  		  callback(tags);

        $(this).dialog("close");
  		},
  		"Cancel" : function() {
  		  $(this).dialog("close");
  		}
  	},
   close: function(event, ui) {
     $(this).remove();
   }
  });

  $('#asset_tags').load(SITE_URL+'/admin/asset_search.html?ids='+ids.join(','));

}
